<!doctype html>



  


<html class="theme-next pisces use-motion">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />












  
  
  <link href="/vendors/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/vendors/font-awesome/css/font-awesome.min.css?v=4.4.0" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.0.1" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Android,动态加载," />





  <link rel="alternate" href="/atom.xml" title="GrantonZhuang's Blog" type="application/atom+xml" />




  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.0.1" />






<meta name="description" content="Android 动态加载的技术出现已久，作为一个 Android Developer，现在才开始研究这门技术，有点惭愧。
初步使用，本文只讨论 仅限于动态加载 .class 文件的情况，后续会继续探究动态加载布局等资源文件等。">
<meta property="og:type" content="article">
<meta property="og:title" content="Android-动态加载入门">
<meta property="og:url" content="https://grantonzhuang.github.io/2016/05/22/Android-动态加载入门/index.html">
<meta property="og:site_name" content="GrantonZhuang's Blog">
<meta property="og:description" content="Android 动态加载的技术出现已久，作为一个 Android Developer，现在才开始研究这门技术，有点惭愧。
初步使用，本文只讨论 仅限于动态加载 .class 文件的情况，后续会继续探究动态加载布局等资源文件等。">
<meta property="og:updated_time" content="2016-07-29T13:56:02.584Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Android-动态加载入门">
<meta name="twitter:description" content="Android 动态加载的技术出现已久，作为一个 Android Developer，现在才开始研究这门技术，有点惭愧。
初步使用，本文只讨论 仅限于动态加载 .class 文件的情况，后续会继续探究动态加载布局等资源文件等。">



<script type="text/javascript" id="hexo.configuration">
  var NexT = window.NexT || {};
  var CONFIG = {
    scheme: 'Pisces',
    sidebar: {"position":"left","display":"post"},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: 0,
      author: '博主'
    }
  };
</script>




  <link rel="canonical" href="https://grantonzhuang.github.io/2016/05/22/Android-动态加载入门/"/>

  <title> Android-动态加载入门 | GrantonZhuang's Blog </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  










  
  
    
  

  <div class="container one-collumn sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta ">
  

  <div class="custom-logo-site-title">
    <a href="/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">GrantonZhuang's Blog</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
  <p class="site-subtitle"></p>
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/index.html" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/index.html" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/index.html" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      

      
    </ul>
  

  
</nav>

 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  
  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                Android-动态加载入门
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            <span class="post-meta-item-icon">
              <i class="fa fa-calendar-o"></i>
            </span>
            <span class="post-meta-item-text">发表于</span>
            <time itemprop="dateCreated" datetime="2016-05-22T12:32:44+08:00" content="2016-05-22">
              2016-05-22
            </time>
          </span>

          

          
            
          

          

          
          

          
        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>Android 动态加载的技术出现已久，作为一个 Android Developer，现在才开始研究这门技术，有点惭愧。</p>
<p>初步使用，本文只讨论 仅限于动态加载 .class 文件的情况，后续会继续探究动态加载布局等资源文件等。</p>
<a id="more"></a>
<h2 id="实现思路"><a href="#实现思路" class="headerlink" title="实现思路"></a>实现思路</h2><h3 id="编译插件"><a href="#编译插件" class="headerlink" title="编译插件"></a>编译插件</h3><p>推荐的思路是，在 Android Studio 中另外开一个 Module，在其中编写需要的插件，之后在<br><code>/pathToProject/pathToLibrary/build/intermediates/classes/debug/com/package/name</code><br>中可以看到编译过后的 .class 文件。</p>
<p>将 <code>com/package/name</code> 整个目录复制出来，剔除不必要的 .class 文件，直接打包成 .jar 文件。</p>
<p>再使用 dx 工具打包成 .dex 文件</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">➜  23.0.2  <span class="built_in">pwd</span></div><div class="line">/path/to/sdk/build-tools/23.0.2</div><div class="line">➜  23.0.2  ./dx --dex --output=demo.dex /path/to/com.jar</div><div class="line">Picked up _JAVA_OPTIONS:   -Dawt.useSystemAAFontSettings=gasp</div></pre></td></tr></table></figure>
<h3 id="下载插件"><a href="#下载插件" class="headerlink" title="下载插件"></a>下载插件</h3><p>在进行测试的时候，推荐 python 的一个超级方便的功能</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">➜  Desktop  python -m SimpleHTTPServer</div><div class="line">Serving HTTP on 0.0.0.0 port 8000 ...</div></pre></td></tr></table></figure>
<p>这样子，.dex 的文件的下载地址就是(同一个局域网，PC 的 IP 地址为 <code>192.168.1.103</code>)</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">String strUrl = <span class="string">"http://192.168.1.103:8000/demo.dex"</span>;</div></pre></td></tr></table></figure>
<p>首先我们定义 .dex 要下载到的路径。</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">dexFilePath = Environment.getExternalStorageDirectory().getAbsolutePath()</div><div class="line">		+ File.separator + <span class="string">"demo.dex"</span>;</div></pre></td></tr></table></figure>
<h3 id="文件读写，加载对应的-dex-jar-apk-文件"><a href="#文件读写，加载对应的-dex-jar-apk-文件" class="headerlink" title="文件读写，加载对应的 dex jar apk 文件"></a>文件读写，加载对应的 dex jar apk 文件</h3><p>这里写一个简单的栗子，下载 .dex 文件后转存到 data 目录（我们熟知的缓存文件，数据库文件等也在此目录）。</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div></pre></td><td class="code"><pre><div class="line"> <span class="keyword">new</span> Thread(<span class="keyword">new</span> Runnable() &#123;</div><div class="line">    <span class="meta">@Override</span></div><div class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">run</span><span class="params">()</span> </span>&#123;</div><div class="line"></div><div class="line">        downloadDexFile();</div><div class="line"></div><div class="line">        Handler handler = <span class="keyword">new</span> Handler(Looper.getMainLooper());</div><div class="line">        handler.post(<span class="keyword">new</span> Runnable() &#123;</div><div class="line">            <span class="meta">@Override</span></div><div class="line">            <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">run</span><span class="params">()</span> </span>&#123;</div><div class="line">                afterDownload();</div><div class="line">            &#125;</div><div class="line">        &#125;);</div><div class="line">    &#125;</div><div class="line">&#125;).start();</div></pre></td></tr></table></figure>
<p>下载完成以后</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div></pre></td><td class="code"><pre><div class="line"><span class="function"><span class="keyword">private</span> <span class="keyword">void</span> <span class="title">afterDownload</span><span class="params">()</span> </span>&#123;</div><div class="line"></div><div class="line">    File dexFielPath = <span class="keyword">new</span> File(dexFilePath);</div><div class="line">    File dexOutputDir = <span class="keyword">this</span>.getDir(<span class="string">"dex"</span>, Context.MODE_PRIVATE);</div><div class="line"></div><div class="line">    DexClassLoader dexClassLoader = <span class="keyword">new</span> DexClassLoader(</div><div class="line">    	dexFielPath.getAbsolutePath(), dexOutputDir.getAbsolutePath(),</div><div class="line">        <span class="keyword">null</span>, getClassLoader()</div><div class="line">    );</div><div class="line"></div><div class="line">    callClassMethod(dexClassLoader);</div><div class="line"></div><div class="line">    callInterfaceMethod(dexClassLoader);</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<p>我们使用 <code>DexClassLoader</code> 来加载 dex 里的 class 文件。</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">File dexOutputDir = <span class="keyword">this</span>.getDir(<span class="string">"dex"</span>, Context.MODE_PRIVATE);</div><div class="line">DexClassLoader dexClassLoader = <span class="keyword">new</span> DexClassLoader(</div><div class="line">	dexFielPath.getAbsolutePath(), dexOutputDir.getAbsolutePath(),</div><div class="line">	<span class="keyword">null</span>, getClassLoader()</div><div class="line">);</div></pre></td></tr></table></figure>
<ul>
<li><p>第一个参数为我们刚刚下载存储的路径。</p>
</li>
<li><p>第二个参数为内部存储存放 .dex 文件的路径， <code>/data/data/packageName/app_dex</code></p>
</li>
<li><p>第三个参数为 库 的路径，这里为 null</p>
</li>
<li><p>第四个参数为 ClassLoader</p>
</li>
</ul>
<p>这样，我们就拿到了加载了 .dex 文件的 <code>classLoader</code></p>
<h3 id="利用反射加载需要的类，执行需要的方法"><a href="#利用反射加载需要的类，执行需要的方法" class="headerlink" title="利用反射加载需要的类，执行需要的方法"></a>利用反射加载需要的类，执行需要的方法</h3><h4 id="直接调用"><a href="#直接调用" class="headerlink" title="直接调用"></a>直接调用</h4><p>插件的代码</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">package</span> com.granton.mylibrary;</div><div class="line"></div><div class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">Demo</span> </span>&#123;</div><div class="line">    <span class="function"><span class="keyword">public</span> String <span class="title">test</span><span class="params">()</span> </span>&#123;</div><div class="line">        <span class="keyword">return</span> <span class="string">"test"</span>;</div><div class="line">    &#125;</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<p>通过反射来调用</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div></pre></td><td class="code"><pre><div class="line"><span class="function"><span class="keyword">private</span> <span class="keyword">void</span> <span class="title">callClassMethod</span><span class="params">(DexClassLoader dexClassLoader)</span> </span>&#123;</div><div class="line">    Class demoClass = <span class="keyword">null</span>;</div><div class="line">    <span class="keyword">try</span> &#123;</div><div class="line">        demoClass = dexClassLoader.loadClass(<span class="string">"com.granton.mylibrary.Demo"</span>);</div><div class="line">        Method testMethod = demoClass.getDeclaredMethod(<span class="string">"test"</span>);</div><div class="line">        testMethod.setAccessible(<span class="keyword">true</span>);</div><div class="line">        <span class="comment">// 这里需要根据构造函数的具体情况来使用 newInstance() 方法</span></div><div class="line">        String string = (String) testMethod.invoke(demoClass.newInstance());</div><div class="line">        Toast.makeText(MainActivity.<span class="keyword">this</span>, string, Toast.LENGTH_SHORT).show();</div><div class="line">    &#125; <span class="keyword">catch</span> (Exception e) &#123;</div><div class="line">        e.printStackTrace();</div><div class="line">    &#125;</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<p>这种方法需要注意的地方是，因为主项目中不存在这个类和方法，所以只能通过方法名得到方法，并且通过 <code>method.invoke(receiver, args)</code> 来调用。</p>
<h4 id="把需要调用的方法抽象成接口方法"><a href="#把需要调用的方法抽象成接口方法" class="headerlink" title="把需要调用的方法抽象成接口方法"></a>把需要调用的方法抽象成接口方法</h4><p>插件的接口（存放在主项目中，不能打包进 .dex 文件）</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">package</span> com.granton.mylibrary;</div><div class="line"></div><div class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">interface</span> <span class="title">IDemo</span> </span>&#123;</div><div class="line"></div><div class="line">    <span class="function">String <span class="title">demoTest</span><span class="params">()</span></span>;</div><div class="line"></div><div class="line">&#125;</div></pre></td></tr></table></figure>
<p>插件的接口实现</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">package</span> com.granton.mylibrary;</div><div class="line"></div><div class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">IDemoImpl</span> <span class="keyword">implements</span> <span class="title">IDemo</span> </span>&#123;</div><div class="line">    <span class="meta">@Override</span></div><div class="line">    <span class="function"><span class="keyword">public</span> String <span class="title">demoTest</span><span class="params">()</span> </span>&#123;</div><div class="line">        <span class="keyword">return</span> <span class="string">"demoTest"</span>;</div><div class="line">    &#125;</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<p>插件的调用</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div></pre></td><td class="code"><pre><div class="line"><span class="function"><span class="keyword">private</span> <span class="keyword">void</span> <span class="title">callInterfaceMethod</span><span class="params">(DexClassLoader dexClassLoader)</span> </span>&#123;</div><div class="line">    Class impl = <span class="keyword">null</span>;</div><div class="line">    <span class="keyword">try</span> &#123;</div><div class="line">        impl = dexClassLoader.loadClass(<span class="string">"com.granton.mylibrary.IDemoImpl"</span>);</div><div class="line">        <span class="comment">// 这里需要根据构造函数的具体情况来使用 newInstance() 方法</span></div><div class="line">        IDemo idemo = (IDemo) impl.newInstance();</div><div class="line">        String string = idemo.demoTest();</div><div class="line">        Toast.makeText(MainActivity.<span class="keyword">this</span>, string, Toast.LENGTH_SHORT).show();</div><div class="line">    &#125; <span class="keyword">catch</span> (Exception e) &#123;</div><div class="line">        e.printStackTrace();</div><div class="line">    &#125;</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<p>这样子，调用接口方法的时候，可以根据 IDE 的提示进行编写，也符合面向接口编程的原则，对于项目的抽象和组织也会起到很大作用。</p>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Android/" rel="tag">#Android</a>
          
            <a href="/tags/动态加载/" rel="tag">#动态加载</a>
          
        </div>
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2016/05/14/Realm初步实践 2 /" rel="next" title="Realm初步实践２">
                <i class="fa fa-chevron-left"></i> Realm初步实践２
              </a>
            
          </div>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2016/05/26/使用nexus搭建maven仓库/" rel="prev" title="使用nexus搭建maven仓库">
                使用nexus搭建maven仓库 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel ">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="http://ww1.sinaimg.cn/mw690/6e8939a6gw1f3g1u1mc6lj20hs0hsmxf.jpg"
               alt="Granton Zhuang" />
          <p class="site-author-name" itemprop="name">Granton Zhuang</p>
          <p class="site-description motion-element" itemprop="description"></p>
        </div>
        <nav class="site-state motion-element">
          <div class="site-state-item site-state-posts">
            <a href="/archives/index.html">
              <span class="site-state-item-count">26</span>
              <span class="site-state-item-name">日志</span>
            </a>
          </div>

          

          
            <div class="site-state-item site-state-tags">
              <a href="/tags/index.html">
                <span class="site-state-item-count">11</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        
          <div class="feed-link motion-element">
            <a href="/atom.xml" rel="alternate">
              <i class="fa fa-rss"></i>
              RSS
            </a>
          </div>
        

        <div class="links-of-author motion-element">
          
        </div>

        
        

        
        

      </section>

      
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">
            
              
            
            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#实现思路"><span class="nav-number">1.</span> <span class="nav-text">实现思路</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#编译插件"><span class="nav-number">1.1.</span> <span class="nav-text">编译插件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#下载插件"><span class="nav-number">1.2.</span> <span class="nav-text">下载插件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#文件读写，加载对应的-dex-jar-apk-文件"><span class="nav-number">1.3.</span> <span class="nav-text">文件读写，加载对应的 dex jar apk 文件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#利用反射加载需要的类，执行需要的方法"><span class="nav-number">1.4.</span> <span class="nav-text">利用反射加载需要的类，执行需要的方法</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#直接调用"><span class="nav-number">1.4.1.</span> <span class="nav-text">直接调用</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#把需要调用的方法抽象成接口方法"><span class="nav-number">1.4.2.</span> <span class="nav-text">把需要调用的方法抽象成接口方法</span></a></li></ol></li></ol></li></ol></div>
            
          </div>
        </section>
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2016</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Granton Zhuang</span>
</div>

<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Pisces
  </a>
</div>

        

        
      </div>
    </footer>

    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
    </div>
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  



  
  <script type="text/javascript" src="/vendors/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/vendors/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/vendors/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/vendors/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/vendors/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/vendors/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.0.1"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.0.1"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.0.1"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.0.1"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.0.1"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.0.1"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.0.1"></script>



  



  




  
  

  

  

  

</body>
</html>
